<!doctype html>

<title>CodeMirror: BBCode mixed mode</title>
<meta charset="utf-8"/>
<link rel=stylesheet href="../../doc/docs.css">

<link rel="stylesheet" href="../../lib/codemirror.css">
<script src="../../lib/codemirror.js"></script>
<script src="../../mode/xml/xml.js"></script>
<script src="../../mode/javascript/javascript.js"></script>
<script src="../../mode/css/css.js"></script>
<script src="../../mode/htmlmixed/htmlmixed.js"></script>
<script src="../../mode/bbcode/bbcode.js"></script>
<script src="../../mode/bbcodemixed/bbcodemixed.js"></script>
<div id=nav>
  <a href="http://codemirror.net"><img id=logo src="../../doc/logo.png"></a>

  <ul>
    <li><a href="../../index.html">Home</a>
    <li><a href="../../doc/manual.html">Manual</a>
    <li><a href="https://github.com/marijnh/codemirror">Code</a>
  </ul>
  <ul>
    <li><a href="../index.html">Language modes</a>
    <li><a class=active href="#">BBCode mixed</a>
  </ul>
</div>

<article>
<h2>BBCode mixed mode</h2>
<form><textarea id="code" name="code">
  [literal]
  <script type="text/javascript">//<![CDATA[
  
    var myCodeMirror = CodeMirror.fromTextArea(document.getElementById("code"), {
      mode           : "bbcodemixed",
      tabSize        : 2,
      indentUnit     : 2,
      indentWithTabs : false,
      lineNumbers    : true
    });
    // ]]>
  </script>
  [/literal]
  <style>
    /* CSS content 
    [b]bbcode[/b] */
    .some-class { font-weight: bolder; color: "orange"; }
  </style>
    [*] item [:-)]
    Normal text [b]Bold text[/b] [i]italic[/i] [s]strikethrough[/s]
    [hr]

    <strong>[url]http://domain.com[/url]</strong>
    <div>
      [url=http://domain.com?a=1&amp;b=2]<span>Link</span>[/url]
    </div>

    [img]http://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/Go-home.svg/100px-Go-home.svg.png[/img]

    [quote]quoted text[/quote]

    [code]monospaced text[/code]

    [size=15]Large Text[/size]

    [color=red]Red Text[/color]
    or
    [color=#FF0000]Red Text[/color]
    or
    [color=FF0000]Red Text[/color]

    [list] [*]Entry 1 [*]Entry 2 [/list]
    [list] *Entry 1 *Entry 2 [/list]

    [table] [tr] [td]table data[/td] [/tr] [/table]

    <h2>this is H2 tag</h2>
    <p>This is a part of one snippet</p>
    <div id="homeBlocks" class="clearfix">

      <div id="bioBlock" class="placed featured-image-wrapper brick">
        <div class="caption">[home_content]</div>
      </div>
      [pageImage type="medium" link="url" show="99" form="home-images" xhtml="yes"]

    </div>
    [if_data]
    <div class="contact-bar hidden-phone pull-right">
      <!-- <span class="sitePhone"><b>CALL NOW: [sitePhone]</b></span> -->
      %%[contactBar]%%

    </div><!-- END contact-bar -->
    [/if_data]

    [if_data][contactBar][/if_data]

    [if_data]soemthing here %%[contactBar]%% and after[/if_data]

    [if_data]<div class="contact-bar hidden-phone pull-right"><!-- <span
        class="sitePhone"><b>CALL NOW: [sitePhone]</b></span>
      -->%%[contactBar]%%</div><!-- END contact-bar -->[/if_data]

    [if_data]<img src="%%[logoPath]%%" alt="[siteTitle]"
    />[else_if_data][siteTitle][/if_data]

</textarea></form>

    <script type="text/javascript">
      var myCodeMirror = CodeMirror.fromTextArea(document.getElementById("code"), {
        mode           : "bbcodemixed",
        tabSize        : 2,
        indentUnit     : 2,
        indentWithTabs : false,
        lineNumbers    : true,
        matchBrackets  : true
      });
    </script>

    <p>The BBCodeMixed mixed mode depends on the BBCode and HTML mixed modes. HTML
    mixed mode itself depends on XML, JavaScript, and CSS modes.</p>

    <p>It takes the same options, as BBCode and HTML mixed modes.</p>

    <p><strong>MIME types defined:</strong> <code>text/x-bbcode</code>.</p>
  </article>

<!-- vim: set et ts=2 sts=2 sw=2: -->
